package com.gqz.equip.controller;

import com.gqz.common.core.domain.R;
import com.gqz.equip.api.EnTjAnalyseApi;
import com.gqz.equip.service.IEnTjAnalyse;
import com.gqz.equip.vo.*;
import jakarta.annotation.Resource;
import jakarta.validation.Valid;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


/**
 * 能源-首页统计 Controller
 *
 * @Version 1.0
 * @Author input you name
 */
@RestController
public class EnTjAnalyseController implements EnTjAnalyseApi {

    @Resource
    private IEnTjAnalyse tjAnalyse;

    @Override
    public R<EnTjAnalyseTzglVo> getTzgl() {
        return R.ok(tjAnalyse.getTzgl());
    }

    @Override
    public R<EnTjAnalyseKfglVo> getKfgl() {
        return R.ok(tjAnalyse.getKfgl());
    }

    @Override
    public R<EnTjAnalyseCrkVo> getCrkList(@Valid String type) {
        return R.ok(tjAnalyse.getCrkList(type));
    }

    @Override
    public R<List<EnTjAnalyseGdVo>> getGdXx(String sdate, String edate) {
        return R.ok(tjAnalyse.getGdXx(sdate, edate));
    }

    @Override
    public R<List<EnTjDefectsListVo>> getDefectsStatusXx(String sdate, String edate) {
        return R.ok(tjAnalyse.getDefectsStatusXx(sdate, edate));
    }
}
